package ACEbrickBreaker;

/**
 * <p>
 * Title: Brick
 * </p>
 * <p>
 * Description: Brick Contains constructors for the Brick objects that take in
 * arguments for the brick coordinates and color. Getters: get the x and y
 * coordinates of the Brick objects along with the color and whether or not the
 * brick has been hit. Setters: Set whether or not the brick has been hit.
 * </p>
 * 
 * @author Caitlin Finn
 * @email caitlin.finn@my.uwrf.edu
 * @author Erin McNeil
 * @email erin.mcneil@my.uwrf.edu
 * @author Andrew Juranek
 * @email andrew.juranek@my.uwrf.edu
 * @date December 10th 2012
 */
public class Brick {

	// declare x & y coordinates
	int x, y, colorCode;

	// declare boolean to determine if brick has been hit
	boolean hit;

	/**
	 * constructor takes in x and y coordinates
	 * 
	 * @param x
	 * @param y
	 */
	public Brick(int x, int y) {

		this.x = x;
		this.y = y;
		hit = false;
	}

	/**
	 * constructor takes in x and y coordinates and color code
	 * 
	 * @param x
	 * @param y
	 * @param colorCode
	 */
	public Brick(int x, int y, int colorCode) {

		this.x = x;
		this.y = y;
		this.colorCode = colorCode;
		hit = false;
	}

	/**
	 * isHit()
	 * 
	 * @return if hit returns true otherwise returns false
	 */
	public boolean isHit() {
		return hit;
	}

	/**
	 * set if the brick is hit or not
	 * 
	 * @param hit
	 */
	public void setHit(boolean hit) {
		this.hit = hit;
	}

	/**
	 * gets x coordinate of brick
	 * 
	 * @return x
	 */
	public int getX() {
		return x;
	}

	/**
	 * gets y coordinate of brick
	 * 
	 * @return y
	 */
	public int getY() {
		return y;
	}

	/**
	 * returns the color code of the brick so we can tell what level it is
	 * 
	 * @return colorCode
	 */
	public int getColorCode() {
		return colorCode;
	}

}